package com.service;

import com.controller.PaginationSupport;
import com.entity.Employee;
import com.entity.Salary;
import com.form.EmployeeInfo;
import com.form.EmployeeInfoForAdmin;
import com.form.Message;

public interface EmployeeService {
    public Message deleteEmployeeByUsername(String username);

    Employee findByUserNameAndPwd(String username, String password);

    PaginationSupport<Salary> checkSalaryByName(int employeeId, int pageNo, int pageSize);

    EmployeeInfo findInfoByUsername(String username);

    Message updateEmployeeInfo(Employee employee);

    PaginationSupport<EmployeeInfoForAdmin> checkAllemployees(int pageNo, int pageSize);

    Message addEmployee(String username, int departmentId, int levelId);

    /**
     * Find employees by keys pagination support.
     *
     * @param pageNo   the page no
     * @param pageSize the page size
     * @param keys     the keys
     * @return the pagination support
     */
    PaginationSupport<EmployeeInfoForAdmin> findEmployeesByKeys(int pageNo, int pageSize, String keys);

    Message updateEmployeeInfoForAdmin(String username, int departmentId, int levelId);
    int countEmployeeByLevel(int level);

    Message updatePhotoByUsername(String username, String url);
}